home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
-
- /* These externs use the same name as that given to bin2obj */
- /* for the object files. */
- extern char SomeText[];
- extern char Letters[];
-
- int main( void )
- {
- puts( "Test of BIN2OBJ." );
-
- /* This first example shows a straight binary object. */
- /* We have to already know the size of the data. */
- puts( "\nUpper case to lower case:" );
- fwrite( Letters, 1, 2*(26+2), stdout );
-
- /* This example shows one way to use the -n option in bin2obj, */
- /* which puts the 4-byte count of bytes at the beginning of the data. */
- puts( "\n**********" );
- fwrite( SomeText+4, 1, *(int*)SomeText, stdout );
- puts( "**********" );
-
- puts( "\nEnd of test" );
- return 0;
- }
-